Skip to content

refactor(foundations): change Merkle proofs code sample to Tolk#2100

Open
delovoyhomie wants to merge 4 commits intomainfrom
pr-1442-merkle-proofs-tolk
Open

refactor(foundations): change Merkle proofs code sample to Tolk#2100
delovoyhomie wants to merge 4 commits intomainfrom
pr-1442-merkle-proofs-tolk

Conversation

@delovoyhomie
Copy link
Copy Markdown
Contributor

@delovoyhomie delovoyhomie commented Apr 20, 2026

Closes #1442

Summary by CodeRabbit

  • Documentation
    • Updated code examples in the proof fundamentals guide to reflect current best practices and conventions.

@mintlify
Copy link
Copy Markdown

mintlify Bot commented Apr 20, 2026

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
mintlify-ton-docs 🟢 Ready View Preview Apr 20, 2026, 7:44 AM

💡 Tip: Enable Workflows to automatically generate PRs for you.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 20, 2026

Warning

Rate limit exceeded

@delovoyhomie has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 50 minutes and 45 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 50 minutes and 45 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 1b6da2b4-10a3-4ae1-8b0f-131b50d73c32

📥 Commits

Reviewing files that changed from the base of the PR and between c67740f and 6a46d09.

📒 Files selected for processing (1)
  • foundations/proofs/overview.mdx
📝 Walkthrough

Walkthrough

Documentation example migrated from Tact to Tolk syntax for a Merkle proof tree traversal function. Changes include switching API calls (getWorkchainAndHash(), mustGet()), implementing a custom assembly helper (preloadIthRef), using bitwise operations for branch selection, and updating variable bindings to match Tolk conventions.

Changes

Cohort / File(s) Summary
Code Example Migration
foundations/proofs/overview.mdx
Updated Merkle proof tree traversal example from Tact to Tolk, including function API conversions, custom assembly helper implementation, bitwise logic refactoring, and variable binding syntax updates.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🐰 From Tact to Tolk, the example hops,
With bitwise magic and assembly ops,
Merkle trees now dance in Tolk's bright tongue,
Proof paths traversed, documentation sung! 🌿✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main change: migrating Merkle proofs code samples from Tact to Tolk in the foundations documentation.
Linked Issues check ✅ Passed The code changes successfully fulfill the requirement to convert Merkle proofs code samples to Tolk, as specified in linked issue #1442.
Out of Scope Changes check ✅ Passed All changes are directly related to converting the Merkle proofs documentation example from Tact to Tolk, with no out-of-scope modifications.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch pr-1442-merkle-proofs-tolk

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@delovoyhomie delovoyhomie force-pushed the pr-1442-merkle-proofs-tolk branch from ab7bf55 to 0a7eb9c Compare April 20, 2026 07:44
@delovoyhomie delovoyhomie changed the title docs(foundations): change Merkle proofs code sample to Tolk refactor(foundations): change Merkle proofs code sample to Tolk Apr 20, 2026
@delovoyhomie delovoyhomie force-pushed the pr-1442-merkle-proofs-tolk branch from 0a7eb9c to b98f2e3 Compare April 20, 2026 07:51
@delovoyhomie delovoyhomie requested a review from Shvandre April 20, 2026 08:22
@novusnota novusnota marked this pull request as ready for review April 22, 2026 09:01
@novusnota novusnota requested a review from a team as a code owner April 22, 2026 09:01
Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the updates in foundations/proofs/overview.mdx: I have a couple of suggestions to align the Tolk example and an inline comment with the project’s conventions—please apply the inline suggestions.

Comment thread foundations/proofs/overview.mdx
Comment thread foundations/proofs/overview.mdx Outdated
Comment on lines +233 to +235
// shardHashes is a hashmap (workchain -> ShardDescr).
// We only need to retrieve the ShardDescr for workchain 0, since we are working in basechain.
// `mustGet` is safe here, as we already proved that it is a valid block, and a valid masterchain block must have a ShardDescr for workchain 0.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[HIGH] Comment uses “we” in technical documentation

The inline code comment uses first‑person plural phrasing (“we are working in basechain” and “we already proved that it is a valid block”). The project style guide explicitly prohibits first‑person references (“we”/“I”) in documentation and code comments, requiring an impersonal, fact‑focused tone. This violates that HIGH‑severity style rule and could lead to inconsistent tone across the technical documentation. The surrounding code and comments in foundations/proofs/overview.mdx confirm that only these lines introduce the disallowed first‑person language.

Please leave a reaction 👍/👎 to this suggestion to improve future reviews for everyone!

Comment thread foundations/proofs/overview.mdx Outdated
// Cast the address to a slice and skip the 11-bit prefix
// (3 tag bits + 8 workchain bits) to reach the account ID bits.
var accountId = addr as slice;
accountId.skipBits(11);
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider using this function

val (wc, hashPart) = in.senderAddress.getWorkchainAndHash();

Copy link
Copy Markdown
Collaborator

@Shvandre Shvandre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No more comments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Foundations > Merkle proofs] Change code samples to use Tolk

3 participants